package org.msn.component;

import javafx.geometry.Insets;
import javafx.scene.control.TextArea;
import javafx.scene.layout.BorderPane;

public class MessageBorderPane extends BorderPane {
    private String msg;
    private int width = 160;
    private int height = 50;

    public MessageBorderPane(String msg) {
        this.msg = msg;
        slot();
    }

    private void slot() {
        setPadding(new Insets(0, 10, 0, 10));
        setPrefWidth(width);
        setPrefHeight(height);
        TextArea textArea = new TextArea(msg);
        textArea.setEditable(false);
        textArea.setPrefWidth(width);
        textArea.setPrefHeight(height);
        setCenter(textArea);
    }
}
